
const CracoLessPlugin = require("craco-less");
const CracoAntDesignPlugin = require('craco-antd');
const { getThemeVariables } = require('antd/dist/theme');

module.exports = {
    plugins: [
        {
            plugin: CracoAntDesignPlugin,
            options: {
                customizeTheme: {}
            }
        }, {
            plugin: CracoLessPlugin,
            options: {
                lessLoaderOptions: {
                    lessOptions: {
                        javascriptEnabled: true,
                        modifyVars: {
                            ...getThemeVariables({
                                dark: true, // 开启暗黑模式
                                compact: true, // 开启紧凑模式
                            })
                        },
                    },
                },
            },
        },
    ],
}